﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MinhTam.DataAccess.Web;

public partial class bvall : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            hienthi_thongtin();

        }
    }
    public void hienthi_thongtin()
    {
        try
        {


            string loaibaiviet = Request.QueryString["req"];

            if (loaibaiviet != HelpConstEnum.LoaiBaiViet.LUU_BUT_KHACH_HANG.GetHashCode().ToString())
                divButton.Visible = false;

            String sql = @"select ten_loai from loai_bai_viet where loai_bai_viet_id=" + loaibaiviet;
            DataTable table = SQLConnectWeb.GetData(sql);



           chude.Text = table.Rows[0]["ten_loai"].ToString();
            


            String sqls = @"select * from bai_viet a where a.loai_bai_viet=" + loaibaiviet;
            DataTable tables = SQLConnectWeb.GetData(sqls);


            if (tables.Rows[0]["ten_bai_viet"].ToString() != "")
            {
                bvlienquan.DataSource = tables;
                bvlienquan.DataBind();

            }



        }
        catch
        {
        }

    }
}